package com.fymxy.question_bank_management.controller;

import com.fymxy.question_bank_management.pojo.ApiResult;
import com.fymxy.question_bank_management.pojo.ProblemWithBLOBs;
import com.fymxy.question_bank_management.service.ProblemService;
import com.fymxy.question_bank_management.util.ApiResultHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaperShowController {

    @Autowired
    private ProblemService problemService;

    @GetMapping("showPaper/{paperId}")
    public ApiResult showPaper(@PathVariable("paperId") Integer paperId){
        return ApiResultHandler.buildApiResult(200,"查询卷子成功",problemService.selectByPaper(paperId));
    }
}
